import { User } from "../../../../modeal/user.js"
const user = new User()

Page({
  data: {
    riderList: [],
  },

  onLoad: function () {
    this.getRiderList()   // 获取骑手申请列表
  },

  getRiderList () {
    user.getRiderList().then(res => {
      this.setData({ riderList: res })
    })
  },

  // 前往骑手详情
  goRiderDetail (e) {
    let id = e.currentTarget.dataset.item.id
    wx.navigateTo({ url: "/pages/admin/rider/riderDetail/riderDetail?id=" + id })
  }
})